package cn.com.git.admin.service.dto;

import cn.com.git.common.base.BaseAuthenticationDTO;
import cn.com.git.common.base.BaseDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 鉴权dto
 * @author zhangzhenfu
 * @Description
 * @date 2020/2/20 14:09
 */
@Data
public class AuthenticationDTO extends BaseAuthenticationDTO {

    @ApiModelProperty(value = "token信息")
    private String token;

    @ApiModelProperty(value = "用户信息")
    private SysUser sysUser;

    @ApiModelProperty(value = "数据权限：城市id")
    private List<Integer> cityIdList;

    @ApiModelProperty(value = "资源权限：资源id")
    private List<Integer> resourceIdList;

    @Data
    public static class SysUser extends BaseDTO {
        @ApiModelProperty(value = "ID")
        private Integer id;
        @ApiModelProperty(value = "姓名")
        private String name;
        @ApiModelProperty(value = "密码")
        private String password;
        @ApiModelProperty(value = "账号")
        private String account;
        @ApiModelProperty(value = "手机号")
        private String telephone;
        @ApiModelProperty(value = "邮箱")
        private String email;
        @ApiModelProperty(value = "性别，1：男；0：女")
        private Integer sex;
        @ApiModelProperty(value = "头像")
        private String photo;
        @ApiModelProperty(value = "最后登录ip")
        private String lastLoginIp;
        @ApiModelProperty(value = "最后登录时间")
        private Date lastLoginTime;
        @ApiModelProperty(value = "创建时间")
        private Date createTime;
        @ApiModelProperty(value = "更新时间")
        private Date updateTime;
    }

}
